DebugMode
Gets or sets the debug state (i.e. if textOut will print messages to the command window)
Contents
Syntax
state = DebugMode();
DebugMode(state);
Description
The function textOut can be used to display text messages inside the command window. These messages can optionally be logged to a file (see textOut for details) or the output can be disable. To turn off those debug messages, the global variable DisableScreenOut had to be modified in earlier toolbox versions. Now the function DebugMode provides easier access.
state = DebugMode(); returns the current debug state, the return value is either 'on' or 'off'.
DebugMode(state); is used to switch between displaying messages and silent mode. The paramter state has to be 'on' or 'off'.
Note: If you need a fast alternative to strcmpi(DebugMode(), 'on'), please consider the private toolbox function isdebug.
Example
% enable debug messages DebugMode on
% remember old setting oldState = DebugMode(); DebugMode('on'); % do something with textOut(), it will be displayed! % restore previous setting DebugMode(oldState);
See also
Signature
- Author: Linus Atorf (see AUTHORS)
- Date: 2008/07/04
- Copyright: 2007-2008, RWTH Aachen University